﻿using System.IO.Pipes;

namespace IoTSignalR.Client
{
    internal class Program
    {
        static async Task Main(string[] args)
        {
            var pipeClient = new PipeClient(".", "mytest", PipeDirection.InOut, PipeOptions.Asynchronous);
            pipeClient.ReceiveMessageEvent += (sender, msg) =>
            {
                Console.WriteLine(msg);
            };
            await pipeClient.StartAsync();
            while (true)
            {
                var msg = Console.ReadLine();
                pipeClient.SendMsg(msg);
            }
        }
    }
}
